import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
import beCurrent from '@/components/beCurrent'
import pagehome from '@/components/pagehome'
import LearningPartners from '@/components/LearningPartners'
import learningAids from '@/components/learningAids'
import InstructorAssistant from '@/components/InstructorAssistant'
import CreateChatRoom from '@/components/CreateChatRoom'
import MultiPersonChatRoom from '@/components/MultiPersonChatRoom'
Vue.use(Router)

// Router.beforeEach((to, from, next) => {
//   console.log(to, from, SchoolName)
//   document.title = SchoolName + '智能助手'
//   next()
// })

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/pagehome'
    },
    {
      path: '/pagehome',
      name: 'pagehome',
      meta: { title: '首页' },
      component: pagehome
    },
    // {
    //   path: '/',
    //   name: 'HelloWorld',
    //   meta: { name: '基础模板' },
    //   component: HelloWorld
    // },
    {
      path: '/beCurrent',
      name: 'beCurrent',
      meta: { title: '通用语言模型对话' },
      component: beCurrent
    },
    // {
    //   path: '/LearningPartners',
    //   name: 'LearningPartners',
    //   meta: { title: '智能学习伙伴' },
    //   component: LearningPartners
    // },
    {
      path: '/learningAids',
      name: 'learningAids',
      meta: { title: '智能学习助手' },
      component: learningAids
    },
    {
      path: '/InstructorAssistant',
      name: 'InstructorAssistant',
      meta: { title: '智能教员助手' },
      component: InstructorAssistant
    },
    {
      path: '/CreateChatRoom',
      name: 'CreateChatRoom',
      meta: { title: '创建聊天室' },
      component: CreateChatRoom
    },
    {
      path: '/ChatRoom',
      name: 'ChatRoom',
      meta: { title: '多人聊天室' },
      component: MultiPersonChatRoom
    },
  ]
})
